<?php
    include './libadodb/adodb.inc.php';
    include './libadodb/adodb-exceptions.inc.php';
    include './libadodb/adodb-error.inc.php';

    function startDB(){

            static $conn;
/*
            $server   = 'mysql14.kinghost.net';
            $database = 'siapo01';
            $user     = 'siapo01';
            $password = 'd3r0ed';
 * 
*/
            $server   = 'localhost';
            $database = 'siapu';
            $user     = 'root';
            $password = 'mestrado2011';

            if (!$conn){
                    $conn = ADONewConnection('mysql');
                    $conn->Connect($server, $user, $password, $database);
            }
            return $conn;
    }

    $db = startDB();

    function __autoload($classe){
        if (file_exists("class/{$classe}.class.php"))
        {
            include_once "class/{$classe}.class.php";
        }
    }
?>